# 必须从基础镜像开始
#FROM nginx:1.21-alpine
FROM 192.168.7.104:8900/library/my-nginx:1.21-alpine
# 删除默认配置以避免冲突
RUN rm /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf

# 复制自定义配置
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./default.conf /etc/nginx/conf.d/default.conf
# 复制构建产物
COPY dist /usr/share/nginx/html

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
